package asava.trees;

import asava.utils.Operator;

/**
 * @author Tim Richter
 */
public final class BinOp extends Tree {
    public Tree lhs;
    public Tree rhs;
    public Operator operator;

    public BinOp(final Tree lhs,
                 final Tree rhs,
                 final Operator operator) {
        this.lhs = lhs;
        this.rhs = rhs;
        this.operator = operator;
    }

    @Override
    public int kind() {
        return TreeKind.BINOP;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
